package org.nterlearning.datamodel.catalog.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.LocaleUtil;
import com.liferay.portal.kernel.util.LocalizationUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.util.PortalUtil;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import org.nterlearning.datamodel.catalog.model.Course;
import org.nterlearning.datamodel.catalog.model.CourseModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.Locale;
import java.util.Map;

/**
 * The base model implementation for the Course service. Represents a row in the &quot;CATALOG_Course&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link org.nterlearning.datamodel.catalog.model.CourseModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CourseImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see CourseImpl
 * @see org.nterlearning.datamodel.catalog.model.Course
 * @see org.nterlearning.datamodel.catalog.model.CourseModel
 * @generated
 */
public class CourseModelImpl extends BaseModelImpl<Course>
    implements CourseModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a course model instance should use the {@link org.nterlearning.datamodel.catalog.model.Course} interface instead.
     */
    public static final String TABLE_NAME = "CATALOG_Course";
    public static final Object[][] TABLE_COLUMNS = {
            { "courseId", Types.BIGINT },
            { "companyId", Types.BIGINT },
            { "groupId", Types.BIGINT },
            { "userId", Types.BIGINT },
            { "feedReferenceId", Types.BIGINT },
            { "href", Types.VARCHAR },
            { "fullTextHref", Types.VARCHAR },
            { "courseIri", Types.VARCHAR },
            { "updatedDate", Types.TIMESTAMP },
            { "title", Types.VARCHAR },
            { "transcriptAbstract", Types.VARCHAR },
            { "description", Types.VARCHAR },
            { "keywords", Types.VARCHAR },
            { "copyright", Types.VARCHAR },
            { "ratingLevel", Types.VARCHAR },
            { "ratingReason", Types.VARCHAR },
            { "duration", Types.VARCHAR },
            { "durationStandard", Types.VARCHAR },
            { "featuredStatus", Types.DOUBLE },
            { "popularWeight", Types.DOUBLE },
            { "accessCount", Types.BIGINT },
            { "completedCount", Types.BIGINT },
            { "createDate", Types.TIMESTAMP },
            { "removed", Types.BOOLEAN },
            { "removedDate", Types.TIMESTAMP },
            { "supersedesCourseIri", Types.VARCHAR },
            { "supersededByCourseIri", Types.VARCHAR },
            { "releaseOnDate", Types.TIMESTAMP },
            { "acceptUntilDate", Types.TIMESTAMP },
            { "version", Types.VARCHAR },
            { "versionDate", Types.TIMESTAMP },
            { "price", Types.DOUBLE },
            { "priceUnit", Types.VARCHAR },
            { "priceTerms", Types.VARCHAR },
            { "priceExpiration", Types.VARCHAR },
            { "oneStarRateCount", Types.BIGINT },
            { "twoStarRateCount", Types.BIGINT },
            { "threeStarRateCount", Types.BIGINT },
            { "fourStarRateCount", Types.BIGINT },
            { "fiveStarRateCount", Types.BIGINT }
        };
    public static final String TABLE_SQL_CREATE = "create table CATALOG_Course (courseId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,feedReferenceId LONG,href VARCHAR(3999) null,fullTextHref VARCHAR(3999) null,courseIri VARCHAR(255) null,updatedDate DATE null,title STRING null,transcriptAbstract STRING null,description STRING null,keywords STRING null,copyright STRING null,ratingLevel STRING null,ratingReason STRING null,duration VARCHAR(75) null,durationStandard VARCHAR(75) null,featuredStatus DOUBLE,popularWeight DOUBLE,accessCount LONG,completedCount LONG,createDate DATE null,removed BOOLEAN,removedDate DATE null,supersedesCourseIri VARCHAR(255) null,supersededByCourseIri VARCHAR(255) null,releaseOnDate DATE null,acceptUntilDate DATE null,version VARCHAR(75) null,versionDate DATE null,price DOUBLE,priceUnit VARCHAR(75) null,priceTerms VARCHAR(75) null,priceExpiration VARCHAR(75) null,oneStarRateCount LONG,twoStarRateCount LONG,threeStarRateCount LONG,fourStarRateCount LONG,fiveStarRateCount LONG)";
    public static final String TABLE_SQL_DROP = "drop table CATALOG_Course";
    public static final String ORDER_BY_JPQL = " ORDER BY course.featuredStatus ASC";
    public static final String ORDER_BY_SQL = " ORDER BY CATALOG_Course.featuredStatus ASC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.org.nterlearning.datamodel.catalog.model.Course"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.org.nterlearning.datamodel.catalog.model.Course"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.org.nterlearning.datamodel.catalog.model.Course"),
            true);
    public static long COMPANYID_COLUMN_BITMASK = 1L;
    public static long COURSEID_COLUMN_BITMASK = 2L;
    public static long COURSEIRI_COLUMN_BITMASK = 4L;
    public static long FEEDREFERENCEID_COLUMN_BITMASK = 8L;
    public static long GROUPID_COLUMN_BITMASK = 16L;
    public static long SUPERSEDEDBYCOURSEIRI_COLUMN_BITMASK = 32L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.org.nterlearning.datamodel.catalog.model.Course"));
    private static ClassLoader _classLoader = Course.class.getClassLoader();
    private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
            Course.class
        };
    private long _courseId;
    private long _originalCourseId;
    private boolean _setOriginalCourseId;
    private long _companyId;
    private long _originalCompanyId;
    private boolean _setOriginalCompanyId;
    private long _groupId;
    private long _originalGroupId;
    private boolean _setOriginalGroupId;
    private long _userId;
    private String _userUuid;
    private long _feedReferenceId;
    private long _originalFeedReferenceId;
    private boolean _setOriginalFeedReferenceId;
    private String _href;
    private String _fullTextHref;
    private String _courseIri;
    private String _originalCourseIri;
    private Date _updatedDate;
    private String _title;
    private String _titleCurrentLanguageId;
    private String _transcriptAbstract;
    private String _transcriptAbstractCurrentLanguageId;
    private String _description;
    private String _descriptionCurrentLanguageId;
    private String _keywords;
    private String _keywordsCurrentLanguageId;
    private String _copyright;
    private String _copyrightCurrentLanguageId;
    private String _ratingLevel;
    private String _ratingLevelCurrentLanguageId;
    private String _ratingReason;
    private String _ratingReasonCurrentLanguageId;
    private String _duration;
    private String _durationStandard;
    private double _featuredStatus;
    private double _popularWeight;
    private long _accessCount;
    private long _completedCount;
    private Date _createDate;
    private boolean _removed;
    private Date _removedDate;
    private String _supersedesCourseIri;
    private String _supersededByCourseIri;
    private String _originalSupersededByCourseIri;
    private Date _releaseOnDate;
    private Date _acceptUntilDate;
    private String _version;
    private Date _versionDate;
    private double _price;
    private String _priceUnit;
    private String _priceTerms;
    private String _priceExpiration;
    private long _oneStarRateCount;
    private long _twoStarRateCount;
    private long _threeStarRateCount;
    private long _fourStarRateCount;
    private long _fiveStarRateCount;
    private transient ExpandoBridge _expandoBridge;
    private long _columnBitmask;
    private Course _escapedModelProxy;

    public CourseModelImpl() {
    }

    public long getPrimaryKey() {
        return _courseId;
    }

    public void setPrimaryKey(long primaryKey) {
        setCourseId(primaryKey);
    }

    public Serializable getPrimaryKeyObj() {
        return new Long(_courseId);
    }

    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    public Class<?> getModelClass() {
        return Course.class;
    }

    public String getModelClassName() {
        return Course.class.getName();
    }

    public long getCourseId() {
        return _courseId;
    }

    public void setCourseId(long courseId) {
        _columnBitmask |= COURSEID_COLUMN_BITMASK;

        if (!_setOriginalCourseId) {
            _setOriginalCourseId = true;

            _originalCourseId = _courseId;
        }

        _courseId = courseId;
    }

    public long getOriginalCourseId() {
        return _originalCourseId;
    }

    public long getCompanyId() {
        return _companyId;
    }

    public void setCompanyId(long companyId) {
        _columnBitmask |= COMPANYID_COLUMN_BITMASK;

        if (!_setOriginalCompanyId) {
            _setOriginalCompanyId = true;

            _originalCompanyId = _companyId;
        }

        _companyId = companyId;
    }

    public long getOriginalCompanyId() {
        return _originalCompanyId;
    }

    public long getGroupId() {
        return _groupId;
    }

    public void setGroupId(long groupId) {
        _columnBitmask |= GROUPID_COLUMN_BITMASK;

        if (!_setOriginalGroupId) {
            _setOriginalGroupId = true;

            _originalGroupId = _groupId;
        }

        _groupId = groupId;
    }

    public long getOriginalGroupId() {
        return _originalGroupId;
    }

    public long getUserId() {
        return _userId;
    }

    public void setUserId(long userId) {
        _userId = userId;
    }

    public String getUserUuid() throws SystemException {
        return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
    }

    public void setUserUuid(String userUuid) {
        _userUuid = userUuid;
    }

    public long getFeedReferenceId() {
        return _feedReferenceId;
    }

    public void setFeedReferenceId(long feedReferenceId) {
        _columnBitmask |= FEEDREFERENCEID_COLUMN_BITMASK;

        if (!_setOriginalFeedReferenceId) {
            _setOriginalFeedReferenceId = true;

            _originalFeedReferenceId = _feedReferenceId;
        }

        _feedReferenceId = feedReferenceId;
    }

    public long getOriginalFeedReferenceId() {
        return _originalFeedReferenceId;
    }

    public String getHref() {
        if (_href == null) {
            return StringPool.BLANK;
        } else {
            return _href;
        }
    }

    public void setHref(String href) {
        _href = href;
    }

    public String getFullTextHref() {
        if (_fullTextHref == null) {
            return StringPool.BLANK;
        } else {
            return _fullTextHref;
        }
    }

    public void setFullTextHref(String fullTextHref) {
        _fullTextHref = fullTextHref;
    }

    public String getCourseIri() {
        if (_courseIri == null) {
            return StringPool.BLANK;
        } else {
            return _courseIri;
        }
    }

    public void setCourseIri(String courseIri) {
        _columnBitmask |= COURSEIRI_COLUMN_BITMASK;

        if (_originalCourseIri == null) {
            _originalCourseIri = _courseIri;
        }

        _courseIri = courseIri;
    }

    public String getOriginalCourseIri() {
        return GetterUtil.getString(_originalCourseIri);
    }

    public Date getUpdatedDate() {
        return _updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        _updatedDate = updatedDate;
    }

    public String getTitle() {
        if (_title == null) {
            return StringPool.BLANK;
        } else {
            return _title;
        }
    }

    public String getTitle(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getTitle(languageId);
    }

    public String getTitle(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getTitle(languageId, useDefault);
    }

    public String getTitle(String languageId) {
        return LocalizationUtil.getLocalization(getTitle(), languageId);
    }

    public String getTitle(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getTitle(), languageId,
            useDefault);
    }

    public String getTitleCurrentLanguageId() {
        return _titleCurrentLanguageId;
    }

    @JSON
    public String getTitleCurrentValue() {
        Locale locale = getLocale(_titleCurrentLanguageId);

        return getTitle(locale);
    }

    public Map<Locale, String> getTitleMap() {
        return LocalizationUtil.getLocalizationMap(getTitle());
    }

    public void setTitle(String title) {
        _title = title;
    }

    public void setTitle(String title, Locale locale) {
        setTitle(title, locale, LocaleUtil.getDefault());
    }

    public void setTitle(String title, Locale locale, Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(title)) {
            setTitle(LocalizationUtil.updateLocalization(getTitle(), "Title",
                    title, languageId, defaultLanguageId));
        } else {
            setTitle(LocalizationUtil.removeLocalization(getTitle(), "Title",
                    languageId));
        }
    }

    public void setTitleCurrentLanguageId(String languageId) {
        _titleCurrentLanguageId = languageId;
    }

    public void setTitleMap(Map<Locale, String> titleMap) {
        setTitleMap(titleMap, LocaleUtil.getDefault());
    }

    public void setTitleMap(Map<Locale, String> titleMap, Locale defaultLocale) {
        if (titleMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String title = titleMap.get(locale);

            setTitle(title, locale, defaultLocale);
        }
    }

    public String getTranscriptAbstract() {
        if (_transcriptAbstract == null) {
            return StringPool.BLANK;
        } else {
            return _transcriptAbstract;
        }
    }

    public String getTranscriptAbstract(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getTranscriptAbstract(languageId);
    }

    public String getTranscriptAbstract(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getTranscriptAbstract(languageId, useDefault);
    }

    public String getTranscriptAbstract(String languageId) {
        return LocalizationUtil.getLocalization(getTranscriptAbstract(),
            languageId);
    }

    public String getTranscriptAbstract(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getTranscriptAbstract(),
            languageId, useDefault);
    }

    public String getTranscriptAbstractCurrentLanguageId() {
        return _transcriptAbstractCurrentLanguageId;
    }

    @JSON
    public String getTranscriptAbstractCurrentValue() {
        Locale locale = getLocale(_transcriptAbstractCurrentLanguageId);

        return getTranscriptAbstract(locale);
    }

    public Map<Locale, String> getTranscriptAbstractMap() {
        return LocalizationUtil.getLocalizationMap(getTranscriptAbstract());
    }

    public void setTranscriptAbstract(String transcriptAbstract) {
        _transcriptAbstract = transcriptAbstract;
    }

    public void setTranscriptAbstract(String transcriptAbstract, Locale locale) {
        setTranscriptAbstract(transcriptAbstract, locale,
            LocaleUtil.getDefault());
    }

    public void setTranscriptAbstract(String transcriptAbstract, Locale locale,
        Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(transcriptAbstract)) {
            setTranscriptAbstract(LocalizationUtil.updateLocalization(
                    getTranscriptAbstract(), "TranscriptAbstract",
                    transcriptAbstract, languageId, defaultLanguageId));
        } else {
            setTranscriptAbstract(LocalizationUtil.removeLocalization(
                    getTranscriptAbstract(), "TranscriptAbstract", languageId));
        }
    }

    public void setTranscriptAbstractCurrentLanguageId(String languageId) {
        _transcriptAbstractCurrentLanguageId = languageId;
    }

    public void setTranscriptAbstractMap(
        Map<Locale, String> transcriptAbstractMap) {
        setTranscriptAbstractMap(transcriptAbstractMap, LocaleUtil.getDefault());
    }

    public void setTranscriptAbstractMap(
        Map<Locale, String> transcriptAbstractMap, Locale defaultLocale) {
        if (transcriptAbstractMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String transcriptAbstract = transcriptAbstractMap.get(locale);

            setTranscriptAbstract(transcriptAbstract, locale, defaultLocale);
        }
    }

    public String getDescription() {
        if (_description == null) {
            return StringPool.BLANK;
        } else {
            return _description;
        }
    }

    public String getDescription(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getDescription(languageId);
    }

    public String getDescription(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getDescription(languageId, useDefault);
    }

    public String getDescription(String languageId) {
        return LocalizationUtil.getLocalization(getDescription(), languageId);
    }

    public String getDescription(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getDescription(), languageId,
            useDefault);
    }

    public String getDescriptionCurrentLanguageId() {
        return _descriptionCurrentLanguageId;
    }

    @JSON
    public String getDescriptionCurrentValue() {
        Locale locale = getLocale(_descriptionCurrentLanguageId);

        return getDescription(locale);
    }

    public Map<Locale, String> getDescriptionMap() {
        return LocalizationUtil.getLocalizationMap(getDescription());
    }

    public void setDescription(String description) {
        _description = description;
    }

    public void setDescription(String description, Locale locale) {
        setDescription(description, locale, LocaleUtil.getDefault());
    }

    public void setDescription(String description, Locale locale,
        Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(description)) {
            setDescription(LocalizationUtil.updateLocalization(
                    getDescription(), "Description", description, languageId,
                    defaultLanguageId));
        } else {
            setDescription(LocalizationUtil.removeLocalization(
                    getDescription(), "Description", languageId));
        }
    }

    public void setDescriptionCurrentLanguageId(String languageId) {
        _descriptionCurrentLanguageId = languageId;
    }

    public void setDescriptionMap(Map<Locale, String> descriptionMap) {
        setDescriptionMap(descriptionMap, LocaleUtil.getDefault());
    }

    public void setDescriptionMap(Map<Locale, String> descriptionMap,
        Locale defaultLocale) {
        if (descriptionMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String description = descriptionMap.get(locale);

            setDescription(description, locale, defaultLocale);
        }
    }

    public String getKeywords() {
        if (_keywords == null) {
            return StringPool.BLANK;
        } else {
            return _keywords;
        }
    }

    public String getKeywords(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getKeywords(languageId);
    }

    public String getKeywords(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getKeywords(languageId, useDefault);
    }

    public String getKeywords(String languageId) {
        return LocalizationUtil.getLocalization(getKeywords(), languageId);
    }

    public String getKeywords(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getKeywords(), languageId,
            useDefault);
    }

    public String getKeywordsCurrentLanguageId() {
        return _keywordsCurrentLanguageId;
    }

    @JSON
    public String getKeywordsCurrentValue() {
        Locale locale = getLocale(_keywordsCurrentLanguageId);

        return getKeywords(locale);
    }

    public Map<Locale, String> getKeywordsMap() {
        return LocalizationUtil.getLocalizationMap(getKeywords());
    }

    public void setKeywords(String keywords) {
        _keywords = keywords;
    }

    public void setKeywords(String keywords, Locale locale) {
        setKeywords(keywords, locale, LocaleUtil.getDefault());
    }

    public void setKeywords(String keywords, Locale locale, Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(keywords)) {
            setKeywords(LocalizationUtil.updateLocalization(getKeywords(),
                    "Keywords", keywords, languageId, defaultLanguageId));
        } else {
            setKeywords(LocalizationUtil.removeLocalization(getKeywords(),
                    "Keywords", languageId));
        }
    }

    public void setKeywordsCurrentLanguageId(String languageId) {
        _keywordsCurrentLanguageId = languageId;
    }

    public void setKeywordsMap(Map<Locale, String> keywordsMap) {
        setKeywordsMap(keywordsMap, LocaleUtil.getDefault());
    }

    public void setKeywordsMap(Map<Locale, String> keywordsMap,
        Locale defaultLocale) {
        if (keywordsMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String keywords = keywordsMap.get(locale);

            setKeywords(keywords, locale, defaultLocale);
        }
    }

    public String getCopyright() {
        if (_copyright == null) {
            return StringPool.BLANK;
        } else {
            return _copyright;
        }
    }

    public String getCopyright(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getCopyright(languageId);
    }

    public String getCopyright(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getCopyright(languageId, useDefault);
    }

    public String getCopyright(String languageId) {
        return LocalizationUtil.getLocalization(getCopyright(), languageId);
    }

    public String getCopyright(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getCopyright(), languageId,
            useDefault);
    }

    public String getCopyrightCurrentLanguageId() {
        return _copyrightCurrentLanguageId;
    }

    @JSON
    public String getCopyrightCurrentValue() {
        Locale locale = getLocale(_copyrightCurrentLanguageId);

        return getCopyright(locale);
    }

    public Map<Locale, String> getCopyrightMap() {
        return LocalizationUtil.getLocalizationMap(getCopyright());
    }

    public void setCopyright(String copyright) {
        _copyright = copyright;
    }

    public void setCopyright(String copyright, Locale locale) {
        setCopyright(copyright, locale, LocaleUtil.getDefault());
    }

    public void setCopyright(String copyright, Locale locale,
        Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(copyright)) {
            setCopyright(LocalizationUtil.updateLocalization(getCopyright(),
                    "Copyright", copyright, languageId, defaultLanguageId));
        } else {
            setCopyright(LocalizationUtil.removeLocalization(getCopyright(),
                    "Copyright", languageId));
        }
    }

    public void setCopyrightCurrentLanguageId(String languageId) {
        _copyrightCurrentLanguageId = languageId;
    }

    public void setCopyrightMap(Map<Locale, String> copyrightMap) {
        setCopyrightMap(copyrightMap, LocaleUtil.getDefault());
    }

    public void setCopyrightMap(Map<Locale, String> copyrightMap,
        Locale defaultLocale) {
        if (copyrightMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String copyright = copyrightMap.get(locale);

            setCopyright(copyright, locale, defaultLocale);
        }
    }

    public String getRatingLevel() {
        if (_ratingLevel == null) {
            return StringPool.BLANK;
        } else {
            return _ratingLevel;
        }
    }

    public String getRatingLevel(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getRatingLevel(languageId);
    }

    public String getRatingLevel(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getRatingLevel(languageId, useDefault);
    }

    public String getRatingLevel(String languageId) {
        return LocalizationUtil.getLocalization(getRatingLevel(), languageId);
    }

    public String getRatingLevel(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getRatingLevel(), languageId,
            useDefault);
    }

    public String getRatingLevelCurrentLanguageId() {
        return _ratingLevelCurrentLanguageId;
    }

    @JSON
    public String getRatingLevelCurrentValue() {
        Locale locale = getLocale(_ratingLevelCurrentLanguageId);

        return getRatingLevel(locale);
    }

    public Map<Locale, String> getRatingLevelMap() {
        return LocalizationUtil.getLocalizationMap(getRatingLevel());
    }

    public void setRatingLevel(String ratingLevel) {
        _ratingLevel = ratingLevel;
    }

    public void setRatingLevel(String ratingLevel, Locale locale) {
        setRatingLevel(ratingLevel, locale, LocaleUtil.getDefault());
    }

    public void setRatingLevel(String ratingLevel, Locale locale,
        Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(ratingLevel)) {
            setRatingLevel(LocalizationUtil.updateLocalization(
                    getRatingLevel(), "RatingLevel", ratingLevel, languageId,
                    defaultLanguageId));
        } else {
            setRatingLevel(LocalizationUtil.removeLocalization(
                    getRatingLevel(), "RatingLevel", languageId));
        }
    }

    public void setRatingLevelCurrentLanguageId(String languageId) {
        _ratingLevelCurrentLanguageId = languageId;
    }

    public void setRatingLevelMap(Map<Locale, String> ratingLevelMap) {
        setRatingLevelMap(ratingLevelMap, LocaleUtil.getDefault());
    }

    public void setRatingLevelMap(Map<Locale, String> ratingLevelMap,
        Locale defaultLocale) {
        if (ratingLevelMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String ratingLevel = ratingLevelMap.get(locale);

            setRatingLevel(ratingLevel, locale, defaultLocale);
        }
    }

    public String getRatingReason() {
        if (_ratingReason == null) {
            return StringPool.BLANK;
        } else {
            return _ratingReason;
        }
    }

    public String getRatingReason(Locale locale) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getRatingReason(languageId);
    }

    public String getRatingReason(Locale locale, boolean useDefault) {
        String languageId = LocaleUtil.toLanguageId(locale);

        return getRatingReason(languageId, useDefault);
    }

    public String getRatingReason(String languageId) {
        return LocalizationUtil.getLocalization(getRatingReason(), languageId);
    }

    public String getRatingReason(String languageId, boolean useDefault) {
        return LocalizationUtil.getLocalization(getRatingReason(), languageId,
            useDefault);
    }

    public String getRatingReasonCurrentLanguageId() {
        return _ratingReasonCurrentLanguageId;
    }

    @JSON
    public String getRatingReasonCurrentValue() {
        Locale locale = getLocale(_ratingReasonCurrentLanguageId);

        return getRatingReason(locale);
    }

    public Map<Locale, String> getRatingReasonMap() {
        return LocalizationUtil.getLocalizationMap(getRatingReason());
    }

    public void setRatingReason(String ratingReason) {
        _ratingReason = ratingReason;
    }

    public void setRatingReason(String ratingReason, Locale locale) {
        setRatingReason(ratingReason, locale, LocaleUtil.getDefault());
    }

    public void setRatingReason(String ratingReason, Locale locale,
        Locale defaultLocale) {
        String languageId = LocaleUtil.toLanguageId(locale);
        String defaultLanguageId = LocaleUtil.toLanguageId(defaultLocale);

        if (Validator.isNotNull(ratingReason)) {
            setRatingReason(LocalizationUtil.updateLocalization(
                    getRatingReason(), "RatingReason", ratingReason,
                    languageId, defaultLanguageId));
        } else {
            setRatingReason(LocalizationUtil.removeLocalization(
                    getRatingReason(), "RatingReason", languageId));
        }
    }

    public void setRatingReasonCurrentLanguageId(String languageId) {
        _ratingReasonCurrentLanguageId = languageId;
    }

    public void setRatingReasonMap(Map<Locale, String> ratingReasonMap) {
        setRatingReasonMap(ratingReasonMap, LocaleUtil.getDefault());
    }

    public void setRatingReasonMap(Map<Locale, String> ratingReasonMap,
        Locale defaultLocale) {
        if (ratingReasonMap == null) {
            return;
        }

        Locale[] locales = LanguageUtil.getAvailableLocales();

        for (Locale locale : locales) {
            String ratingReason = ratingReasonMap.get(locale);

            setRatingReason(ratingReason, locale, defaultLocale);
        }
    }

    public String getDuration() {
        if (_duration == null) {
            return StringPool.BLANK;
        } else {
            return _duration;
        }
    }

    public void setDuration(String duration) {
        _duration = duration;
    }

    public String getDurationStandard() {
        if (_durationStandard == null) {
            return StringPool.BLANK;
        } else {
            return _durationStandard;
        }
    }

    public void setDurationStandard(String durationStandard) {
        _durationStandard = durationStandard;
    }

    public double getFeaturedStatus() {
        return _featuredStatus;
    }

    public void setFeaturedStatus(double featuredStatus) {
        _columnBitmask = -1L;

        _featuredStatus = featuredStatus;
    }

    public double getPopularWeight() {
        return _popularWeight;
    }

    public void setPopularWeight(double popularWeight) {
        _popularWeight = popularWeight;
    }

    public long getAccessCount() {
        return _accessCount;
    }

    public void setAccessCount(long accessCount) {
        _accessCount = accessCount;
    }

    public long getCompletedCount() {
        return _completedCount;
    }

    public void setCompletedCount(long completedCount) {
        _completedCount = completedCount;
    }

    public Date getCreateDate() {
        return _createDate;
    }

    public void setCreateDate(Date createDate) {
        _createDate = createDate;
    }

    public boolean getRemoved() {
        return _removed;
    }

    public boolean isRemoved() {
        return _removed;
    }

    public void setRemoved(boolean removed) {
        _removed = removed;
    }

    public Date getRemovedDate() {
        return _removedDate;
    }

    public void setRemovedDate(Date removedDate) {
        _removedDate = removedDate;
    }

    public String getSupersedesCourseIri() {
        if (_supersedesCourseIri == null) {
            return StringPool.BLANK;
        } else {
            return _supersedesCourseIri;
        }
    }

    public void setSupersedesCourseIri(String supersedesCourseIri) {
        _supersedesCourseIri = supersedesCourseIri;
    }

    public String getSupersededByCourseIri() {
        if (_supersededByCourseIri == null) {
            return StringPool.BLANK;
        } else {
            return _supersededByCourseIri;
        }
    }

    public void setSupersededByCourseIri(String supersededByCourseIri) {
        _columnBitmask |= SUPERSEDEDBYCOURSEIRI_COLUMN_BITMASK;

        if (_originalSupersededByCourseIri == null) {
            _originalSupersededByCourseIri = _supersededByCourseIri;
        }

        _supersededByCourseIri = supersededByCourseIri;
    }

    public String getOriginalSupersededByCourseIri() {
        return GetterUtil.getString(_originalSupersededByCourseIri);
    }

    public Date getReleaseOnDate() {
        return _releaseOnDate;
    }

    public void setReleaseOnDate(Date releaseOnDate) {
        _releaseOnDate = releaseOnDate;
    }

    public Date getAcceptUntilDate() {
        return _acceptUntilDate;
    }

    public void setAcceptUntilDate(Date acceptUntilDate) {
        _acceptUntilDate = acceptUntilDate;
    }

    public String getVersion() {
        if (_version == null) {
            return StringPool.BLANK;
        } else {
            return _version;
        }
    }

    public void setVersion(String version) {
        _version = version;
    }

    public Date getVersionDate() {
        return _versionDate;
    }

    public void setVersionDate(Date versionDate) {
        _versionDate = versionDate;
    }

    public double getPrice() {
        return _price;
    }

    public void setPrice(double price) {
        _price = price;
    }

    public String getPriceUnit() {
        if (_priceUnit == null) {
            return StringPool.BLANK;
        } else {
            return _priceUnit;
        }
    }

    public void setPriceUnit(String priceUnit) {
        _priceUnit = priceUnit;
    }

    public String getPriceTerms() {
        if (_priceTerms == null) {
            return StringPool.BLANK;
        } else {
            return _priceTerms;
        }
    }

    public void setPriceTerms(String priceTerms) {
        _priceTerms = priceTerms;
    }

    public String getPriceExpiration() {
        if (_priceExpiration == null) {
            return StringPool.BLANK;
        } else {
            return _priceExpiration;
        }
    }

    public void setPriceExpiration(String priceExpiration) {
        _priceExpiration = priceExpiration;
    }

    public long getOneStarRateCount() {
        return _oneStarRateCount;
    }

    public void setOneStarRateCount(long oneStarRateCount) {
        _oneStarRateCount = oneStarRateCount;
    }

    public long getTwoStarRateCount() {
        return _twoStarRateCount;
    }

    public void setTwoStarRateCount(long twoStarRateCount) {
        _twoStarRateCount = twoStarRateCount;
    }

    public long getThreeStarRateCount() {
        return _threeStarRateCount;
    }

    public void setThreeStarRateCount(long threeStarRateCount) {
        _threeStarRateCount = threeStarRateCount;
    }

    public long getFourStarRateCount() {
        return _fourStarRateCount;
    }

    public void setFourStarRateCount(long fourStarRateCount) {
        _fourStarRateCount = fourStarRateCount;
    }

    public long getFiveStarRateCount() {
        return _fiveStarRateCount;
    }

    public void setFiveStarRateCount(long fiveStarRateCount) {
        _fiveStarRateCount = fiveStarRateCount;
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public Course toEscapedModel() {
        if (_escapedModelProxy == null) {
            _escapedModelProxy = (Course) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelProxyInterfaces,
                    new AutoEscapeBeanHandler(this));
        }

        return _escapedModelProxy;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        if (_expandoBridge == null) {
            _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(),
                    Course.class.getName(), getPrimaryKey());
        }

        return _expandoBridge;
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        getExpandoBridge().setAttributes(serviceContext);
    }

    @Override
    public Object clone() {
        CourseImpl courseImpl = new CourseImpl();

        courseImpl.setCourseId(getCourseId());
        courseImpl.setCompanyId(getCompanyId());
        courseImpl.setGroupId(getGroupId());
        courseImpl.setUserId(getUserId());
        courseImpl.setFeedReferenceId(getFeedReferenceId());
        courseImpl.setHref(getHref());
        courseImpl.setFullTextHref(getFullTextHref());
        courseImpl.setCourseIri(getCourseIri());
        courseImpl.setUpdatedDate(getUpdatedDate());
        courseImpl.setTitle(getTitle());
        courseImpl.setTranscriptAbstract(getTranscriptAbstract());
        courseImpl.setDescription(getDescription());
        courseImpl.setKeywords(getKeywords());
        courseImpl.setCopyright(getCopyright());
        courseImpl.setRatingLevel(getRatingLevel());
        courseImpl.setRatingReason(getRatingReason());
        courseImpl.setDuration(getDuration());
        courseImpl.setDurationStandard(getDurationStandard());
        courseImpl.setFeaturedStatus(getFeaturedStatus());
        courseImpl.setPopularWeight(getPopularWeight());
        courseImpl.setAccessCount(getAccessCount());
        courseImpl.setCompletedCount(getCompletedCount());
        courseImpl.setCreateDate(getCreateDate());
        courseImpl.setRemoved(getRemoved());
        courseImpl.setRemovedDate(getRemovedDate());
        courseImpl.setSupersedesCourseIri(getSupersedesCourseIri());
        courseImpl.setSupersededByCourseIri(getSupersededByCourseIri());
        courseImpl.setReleaseOnDate(getReleaseOnDate());
        courseImpl.setAcceptUntilDate(getAcceptUntilDate());
        courseImpl.setVersion(getVersion());
        courseImpl.setVersionDate(getVersionDate());
        courseImpl.setPrice(getPrice());
        courseImpl.setPriceUnit(getPriceUnit());
        courseImpl.setPriceTerms(getPriceTerms());
        courseImpl.setPriceExpiration(getPriceExpiration());
        courseImpl.setOneStarRateCount(getOneStarRateCount());
        courseImpl.setTwoStarRateCount(getTwoStarRateCount());
        courseImpl.setThreeStarRateCount(getThreeStarRateCount());
        courseImpl.setFourStarRateCount(getFourStarRateCount());
        courseImpl.setFiveStarRateCount(getFiveStarRateCount());

        courseImpl.resetOriginalValues();

        return courseImpl;
    }

    public int compareTo(Course course) {
        int value = 0;

        if (getFeaturedStatus() < course.getFeaturedStatus()) {
            value = -1;
        } else if (getFeaturedStatus() > course.getFeaturedStatus()) {
            value = 1;
        } else {
            value = 0;
        }

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        Course course = null;

        try {
            course = (Course) obj;
        } catch (ClassCastException cce) {
            return false;
        }

        long primaryKey = course.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        CourseModelImpl courseModelImpl = this;

        courseModelImpl._originalCourseId = courseModelImpl._courseId;

        courseModelImpl._setOriginalCourseId = false;

        courseModelImpl._originalCompanyId = courseModelImpl._companyId;

        courseModelImpl._setOriginalCompanyId = false;

        courseModelImpl._originalGroupId = courseModelImpl._groupId;

        courseModelImpl._setOriginalGroupId = false;

        courseModelImpl._originalFeedReferenceId = courseModelImpl._feedReferenceId;

        courseModelImpl._setOriginalFeedReferenceId = false;

        courseModelImpl._originalCourseIri = courseModelImpl._courseIri;

        courseModelImpl._originalSupersededByCourseIri = courseModelImpl._supersededByCourseIri;

        courseModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<Course> toCacheModel() {
        CourseCacheModel courseCacheModel = new CourseCacheModel();

        courseCacheModel.courseId = getCourseId();

        courseCacheModel.companyId = getCompanyId();

        courseCacheModel.groupId = getGroupId();

        courseCacheModel.userId = getUserId();

        courseCacheModel.feedReferenceId = getFeedReferenceId();

        courseCacheModel.href = getHref();

        String href = courseCacheModel.href;

        if ((href != null) && (href.length() == 0)) {
            courseCacheModel.href = null;
        }

        courseCacheModel.fullTextHref = getFullTextHref();

        String fullTextHref = courseCacheModel.fullTextHref;

        if ((fullTextHref != null) && (fullTextHref.length() == 0)) {
            courseCacheModel.fullTextHref = null;
        }

        courseCacheModel.courseIri = getCourseIri();

        String courseIri = courseCacheModel.courseIri;

        if ((courseIri != null) && (courseIri.length() == 0)) {
            courseCacheModel.courseIri = null;
        }

        Date updatedDate = getUpdatedDate();

        if (updatedDate != null) {
            courseCacheModel.updatedDate = updatedDate.getTime();
        } else {
            courseCacheModel.updatedDate = Long.MIN_VALUE;
        }

        courseCacheModel.title = getTitle();

        String title = courseCacheModel.title;

        if ((title != null) && (title.length() == 0)) {
            courseCacheModel.title = null;
        }

        courseCacheModel.transcriptAbstract = getTranscriptAbstract();

        String transcriptAbstract = courseCacheModel.transcriptAbstract;

        if ((transcriptAbstract != null) && (transcriptAbstract.length() == 0)) {
            courseCacheModel.transcriptAbstract = null;
        }

        courseCacheModel.description = getDescription();

        String description = courseCacheModel.description;

        if ((description != null) && (description.length() == 0)) {
            courseCacheModel.description = null;
        }

        courseCacheModel.keywords = getKeywords();

        String keywords = courseCacheModel.keywords;

        if ((keywords != null) && (keywords.length() == 0)) {
            courseCacheModel.keywords = null;
        }

        courseCacheModel.copyright = getCopyright();

        String copyright = courseCacheModel.copyright;

        if ((copyright != null) && (copyright.length() == 0)) {
            courseCacheModel.copyright = null;
        }

        courseCacheModel.ratingLevel = getRatingLevel();

        String ratingLevel = courseCacheModel.ratingLevel;

        if ((ratingLevel != null) && (ratingLevel.length() == 0)) {
            courseCacheModel.ratingLevel = null;
        }

        courseCacheModel.ratingReason = getRatingReason();

        String ratingReason = courseCacheModel.ratingReason;

        if ((ratingReason != null) && (ratingReason.length() == 0)) {
            courseCacheModel.ratingReason = null;
        }

        courseCacheModel.duration = getDuration();

        String duration = courseCacheModel.duration;

        if ((duration != null) && (duration.length() == 0)) {
            courseCacheModel.duration = null;
        }

        courseCacheModel.durationStandard = getDurationStandard();

        String durationStandard = courseCacheModel.durationStandard;

        if ((durationStandard != null) && (durationStandard.length() == 0)) {
            courseCacheModel.durationStandard = null;
        }

        courseCacheModel.featuredStatus = getFeaturedStatus();

        courseCacheModel.popularWeight = getPopularWeight();

        courseCacheModel.accessCount = getAccessCount();

        courseCacheModel.completedCount = getCompletedCount();

        Date createDate = getCreateDate();

        if (createDate != null) {
            courseCacheModel.createDate = createDate.getTime();
        } else {
            courseCacheModel.createDate = Long.MIN_VALUE;
        }

        courseCacheModel.removed = getRemoved();

        Date removedDate = getRemovedDate();

        if (removedDate != null) {
            courseCacheModel.removedDate = removedDate.getTime();
        } else {
            courseCacheModel.removedDate = Long.MIN_VALUE;
        }

        courseCacheModel.supersedesCourseIri = getSupersedesCourseIri();

        String supersedesCourseIri = courseCacheModel.supersedesCourseIri;

        if ((supersedesCourseIri != null) &&
                (supersedesCourseIri.length() == 0)) {
            courseCacheModel.supersedesCourseIri = null;
        }

        courseCacheModel.supersededByCourseIri = getSupersededByCourseIri();

        String supersededByCourseIri = courseCacheModel.supersededByCourseIri;

        if ((supersededByCourseIri != null) &&
                (supersededByCourseIri.length() == 0)) {
            courseCacheModel.supersededByCourseIri = null;
        }

        Date releaseOnDate = getReleaseOnDate();

        if (releaseOnDate != null) {
            courseCacheModel.releaseOnDate = releaseOnDate.getTime();
        } else {
            courseCacheModel.releaseOnDate = Long.MIN_VALUE;
        }

        Date acceptUntilDate = getAcceptUntilDate();

        if (acceptUntilDate != null) {
            courseCacheModel.acceptUntilDate = acceptUntilDate.getTime();
        } else {
            courseCacheModel.acceptUntilDate = Long.MIN_VALUE;
        }

        courseCacheModel.version = getVersion();

        String version = courseCacheModel.version;

        if ((version != null) && (version.length() == 0)) {
            courseCacheModel.version = null;
        }

        Date versionDate = getVersionDate();

        if (versionDate != null) {
            courseCacheModel.versionDate = versionDate.getTime();
        } else {
            courseCacheModel.versionDate = Long.MIN_VALUE;
        }

        courseCacheModel.price = getPrice();

        courseCacheModel.priceUnit = getPriceUnit();

        String priceUnit = courseCacheModel.priceUnit;

        if ((priceUnit != null) && (priceUnit.length() == 0)) {
            courseCacheModel.priceUnit = null;
        }

        courseCacheModel.priceTerms = getPriceTerms();

        String priceTerms = courseCacheModel.priceTerms;

        if ((priceTerms != null) && (priceTerms.length() == 0)) {
            courseCacheModel.priceTerms = null;
        }

        courseCacheModel.priceExpiration = getPriceExpiration();

        String priceExpiration = courseCacheModel.priceExpiration;

        if ((priceExpiration != null) && (priceExpiration.length() == 0)) {
            courseCacheModel.priceExpiration = null;
        }

        courseCacheModel.oneStarRateCount = getOneStarRateCount();

        courseCacheModel.twoStarRateCount = getTwoStarRateCount();

        courseCacheModel.threeStarRateCount = getThreeStarRateCount();

        courseCacheModel.fourStarRateCount = getFourStarRateCount();

        courseCacheModel.fiveStarRateCount = getFiveStarRateCount();

        return courseCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(81);

        sb.append("{courseId=");
        sb.append(getCourseId());
        sb.append(", companyId=");
        sb.append(getCompanyId());
        sb.append(", groupId=");
        sb.append(getGroupId());
        sb.append(", userId=");
        sb.append(getUserId());
        sb.append(", feedReferenceId=");
        sb.append(getFeedReferenceId());
        sb.append(", href=");
        sb.append(getHref());
        sb.append(", fullTextHref=");
        sb.append(getFullTextHref());
        sb.append(", courseIri=");
        sb.append(getCourseIri());
        sb.append(", updatedDate=");
        sb.append(getUpdatedDate());
        sb.append(", title=");
        sb.append(getTitle());
        sb.append(", transcriptAbstract=");
        sb.append(getTranscriptAbstract());
        sb.append(", description=");
        sb.append(getDescription());
        sb.append(", keywords=");
        sb.append(getKeywords());
        sb.append(", copyright=");
        sb.append(getCopyright());
        sb.append(", ratingLevel=");
        sb.append(getRatingLevel());
        sb.append(", ratingReason=");
        sb.append(getRatingReason());
        sb.append(", duration=");
        sb.append(getDuration());
        sb.append(", durationStandard=");
        sb.append(getDurationStandard());
        sb.append(", featuredStatus=");
        sb.append(getFeaturedStatus());
        sb.append(", popularWeight=");
        sb.append(getPopularWeight());
        sb.append(", accessCount=");
        sb.append(getAccessCount());
        sb.append(", completedCount=");
        sb.append(getCompletedCount());
        sb.append(", createDate=");
        sb.append(getCreateDate());
        sb.append(", removed=");
        sb.append(getRemoved());
        sb.append(", removedDate=");
        sb.append(getRemovedDate());
        sb.append(", supersedesCourseIri=");
        sb.append(getSupersedesCourseIri());
        sb.append(", supersededByCourseIri=");
        sb.append(getSupersededByCourseIri());
        sb.append(", releaseOnDate=");
        sb.append(getReleaseOnDate());
        sb.append(", acceptUntilDate=");
        sb.append(getAcceptUntilDate());
        sb.append(", version=");
        sb.append(getVersion());
        sb.append(", versionDate=");
        sb.append(getVersionDate());
        sb.append(", price=");
        sb.append(getPrice());
        sb.append(", priceUnit=");
        sb.append(getPriceUnit());
        sb.append(", priceTerms=");
        sb.append(getPriceTerms());
        sb.append(", priceExpiration=");
        sb.append(getPriceExpiration());
        sb.append(", oneStarRateCount=");
        sb.append(getOneStarRateCount());
        sb.append(", twoStarRateCount=");
        sb.append(getTwoStarRateCount());
        sb.append(", threeStarRateCount=");
        sb.append(getThreeStarRateCount());
        sb.append(", fourStarRateCount=");
        sb.append(getFourStarRateCount());
        sb.append(", fiveStarRateCount=");
        sb.append(getFiveStarRateCount());
        sb.append("}");

        return sb.toString();
    }

    public String toXmlString() {
        StringBundler sb = new StringBundler(124);

        sb.append("<model><model-name>");
        sb.append("org.nterlearning.datamodel.catalog.model.Course");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>courseId</column-name><column-value><![CDATA[");
        sb.append(getCourseId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>companyId</column-name><column-value><![CDATA[");
        sb.append(getCompanyId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>groupId</column-name><column-value><![CDATA[");
        sb.append(getGroupId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>userId</column-name><column-value><![CDATA[");
        sb.append(getUserId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>feedReferenceId</column-name><column-value><![CDATA[");
        sb.append(getFeedReferenceId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>href</column-name><column-value><![CDATA[");
        sb.append(getHref());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>fullTextHref</column-name><column-value><![CDATA[");
        sb.append(getFullTextHref());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>courseIri</column-name><column-value><![CDATA[");
        sb.append(getCourseIri());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>updatedDate</column-name><column-value><![CDATA[");
        sb.append(getUpdatedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>title</column-name><column-value><![CDATA[");
        sb.append(getTitle());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>transcriptAbstract</column-name><column-value><![CDATA[");
        sb.append(getTranscriptAbstract());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>description</column-name><column-value><![CDATA[");
        sb.append(getDescription());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>keywords</column-name><column-value><![CDATA[");
        sb.append(getKeywords());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>copyright</column-name><column-value><![CDATA[");
        sb.append(getCopyright());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ratingLevel</column-name><column-value><![CDATA[");
        sb.append(getRatingLevel());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ratingReason</column-name><column-value><![CDATA[");
        sb.append(getRatingReason());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>duration</column-name><column-value><![CDATA[");
        sb.append(getDuration());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>durationStandard</column-name><column-value><![CDATA[");
        sb.append(getDurationStandard());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>featuredStatus</column-name><column-value><![CDATA[");
        sb.append(getFeaturedStatus());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>popularWeight</column-name><column-value><![CDATA[");
        sb.append(getPopularWeight());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>accessCount</column-name><column-value><![CDATA[");
        sb.append(getAccessCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>completedCount</column-name><column-value><![CDATA[");
        sb.append(getCompletedCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>createDate</column-name><column-value><![CDATA[");
        sb.append(getCreateDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>removed</column-name><column-value><![CDATA[");
        sb.append(getRemoved());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>removedDate</column-name><column-value><![CDATA[");
        sb.append(getRemovedDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>supersedesCourseIri</column-name><column-value><![CDATA[");
        sb.append(getSupersedesCourseIri());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>supersededByCourseIri</column-name><column-value><![CDATA[");
        sb.append(getSupersededByCourseIri());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>releaseOnDate</column-name><column-value><![CDATA[");
        sb.append(getReleaseOnDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>acceptUntilDate</column-name><column-value><![CDATA[");
        sb.append(getAcceptUntilDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>version</column-name><column-value><![CDATA[");
        sb.append(getVersion());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>versionDate</column-name><column-value><![CDATA[");
        sb.append(getVersionDate());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>price</column-name><column-value><![CDATA[");
        sb.append(getPrice());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>priceUnit</column-name><column-value><![CDATA[");
        sb.append(getPriceUnit());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>priceTerms</column-name><column-value><![CDATA[");
        sb.append(getPriceTerms());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>priceExpiration</column-name><column-value><![CDATA[");
        sb.append(getPriceExpiration());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>oneStarRateCount</column-name><column-value><![CDATA[");
        sb.append(getOneStarRateCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>twoStarRateCount</column-name><column-value><![CDATA[");
        sb.append(getTwoStarRateCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>threeStarRateCount</column-name><column-value><![CDATA[");
        sb.append(getThreeStarRateCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>fourStarRateCount</column-name><column-value><![CDATA[");
        sb.append(getFourStarRateCount());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>fiveStarRateCount</column-name><column-value><![CDATA[");
        sb.append(getFiveStarRateCount());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
